import flet as ft


def login(page: ft.Page):
    page.title = "登录"
    # page.vertical_alignment = ft.VerticalAlignment.START
    # page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
    page.add(
        ft.Container(
            content=ft.Card(
                ft.Container(
                    content=ft.Column([
                        ft.Row([
                            ft.Text("邮箱"), ft.TextField()
                        ], alignment=ft.MainAxisAlignment.CENTER),
                        ft.Row([
                            ft.Text("密码"), ft.TextField(password=True)
                        ], alignment=ft.MainAxisAlignment.CENTER),
                        ft.Row([
                            ft.TextButton("注册"), ft.TextButton("登录")
                        ], alignment=ft.MainAxisAlignment.CENTER),
                        ft.Row([
                            ft.TextButton("找回密码")
                        ], alignment=ft.MainAxisAlignment.END)
                    ], alignment=ft.MainAxisAlignment.CENTER)
                ), width=500, height=300,
            ), alignment=ft.Alignment(0, 0),  # 设置容器内部内容的对齐方式
            width=page.width, height=page.height  # 使容器覆盖整个页面
        )
    )

